package com.lds.config.center.server.business.namespace.service;

import com.lds.config.center.common.model.namespace.request.NamespaceBaseBatchCreateRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseBatchDeleteRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseBatchUpdateRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseCreateRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseDeleteRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseGetByIdRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseGetByIdsRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseGetByKeyRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseListPageRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseListRequest;
import com.lds.config.center.common.model.namespace.request.NamespaceBaseUpdateRequest;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseBatchCreateResponse;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseBatchDeleteResponse;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseBatchUpdateResponse;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseDeleteResponse;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseListResponse;
import com.lds.config.center.common.model.namespace.response.NamespaceBaseResponse;
import com.lds.config.center.server.business.namespace.entity.Namespace;
import com.lds.config.center.server.common.model.NamespaceName;
import com.lds.management.center.common.model.db.OrderBy;
import com.lds.management.center.common.model.db.PageResult;
import com.lds.management.center.common.model.dto.ResultDTO;


/**
 * 基础服务类
 *
 * @author lidongsheng
 * @since 2025-06-26
 */
public interface NamespaceBaseService {
    /**
     * 创建
     */
    ResultDTO<NamespaceBaseResponse> createNamespace(NamespaceBaseCreateRequest request);

    /**
     * 批量创建
     */
    ResultDTO<NamespaceBaseBatchCreateResponse> batchCreateNamespace(NamespaceBaseBatchCreateRequest request);

    /**
     * 删除
     */
    ResultDTO<NamespaceBaseDeleteResponse> deleteNamespace(NamespaceBaseDeleteRequest request);

    /**
     * 批量删除
     */
    ResultDTO<NamespaceBaseBatchDeleteResponse> batchDeleteNamespace(NamespaceBaseBatchDeleteRequest request);

    /**
     * 更新
     */
    ResultDTO<NamespaceBaseResponse> updateNamespace(NamespaceBaseUpdateRequest request);

    /**
     * 批量更新
     */
    ResultDTO<NamespaceBaseBatchUpdateResponse> batchUpdateNamespace(NamespaceBaseBatchUpdateRequest request);

    /**
     * 根据ID查询
     */
    ResultDTO<NamespaceBaseResponse> getNamespaceById(NamespaceBaseGetByIdRequest request);

    /**
     * 根据ID集合查询
     */
    ResultDTO<NamespaceBaseListResponse> getNamespaceByIds(NamespaceBaseGetByIdsRequest request);

    /**
     * 根据业务主键查询
     */
    Namespace getNamespaceByKey(NamespaceBaseGetByKeyRequest request);

    /**
     * 查询
     */
    ResultDTO<NamespaceBaseListResponse> listNamespace(NamespaceBaseListRequest request);

    /**
     * 查询所有
     */
    ResultDTO<NamespaceBaseListResponse> listAllNamespace(OrderBy orderBy);

    /**
     * 分页查询
     */
    ResultDTO<PageResult<NamespaceBaseResponse>> listNamespacePage(NamespaceBaseListPageRequest request);


    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] start ******************************/

    /**
     * 异步批量创建
     */
    ResultDTO<NamespaceBaseBatchCreateResponse> batchCreateNamespaceAsync(NamespaceBaseBatchCreateRequest request);

    /**
     * 异步批量删除
     */
    ResultDTO<NamespaceBaseBatchDeleteResponse> batchDeleteNamespaceAsync(NamespaceBaseBatchDeleteRequest request);

    /**
     * 异步批量更新
     */
    ResultDTO<NamespaceBaseBatchUpdateResponse> batchUpdateNamespaceAsync(NamespaceBaseBatchUpdateRequest request);

    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] end ******************************/

    NamespaceName getNamespaceName(Long namespaceId);
}